export default {
  props: {
    value: [String, Number, Object],
    row: Object,
    options: Object
  },
  render(h) {
    var color = this.value
    var text = color
    if (color === null || color === this.options.nullValue) {
      color = '#f7f8fa'
      text = this.options.nullText || 'inhert'
    }
    var _opts = {
      size: '',
      width: 80,
      radius: 3,
      border: true,
      showText: true
    }
    return h('em-color-block', {
      attrs: Object.assign(_opts, this.options, {
        color: color,
        text: text
      })
    })
  }
}
